package com.jpa.service.impl;

import org.springframework.beans.factory.annotation.Autowired;  
import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Service;
import com.jpa.redis.RedisClient;
import com.jpa.service.RedisService;


@Service(version="1.0.0",interfaceName="RedisService",protocol="hessian,rmi") 
public class RedisServiceImpl implements RedisService{
	@Autowired
    private RedisClient redisClient;
	@Override
	public void set(String key, Object value) {
		// TODO Auto-generated method stub
		redisClient.set(key, value);
	}

	@Override
	public void setWithExpireTime(String key, String value, int exptime) {
		// TODO Auto-generated method stub
		redisClient.expire(key, value, exptime);;
	}

	@Override
	public String get(String key) {
		// TODO Auto-generated method stub
		return redisClient.get(key);
	}

	@Override
	public void del(String key) {
		// TODO Auto-generated method stub
		redisClient.del(key);
	}

	@Override
	public void set(String key, String value) {
		// TODO Auto-generated method stub
		redisClient.set(key, value);
	}

	@Override
	public Object getObj(String key) {
		// TODO Auto-generated method stub
		return redisClient.getObj(key);
	}

	@Override
	public void expire(String key, Object value, Integer times) {
		// TODO Auto-generated method stub
		redisClient.expire(key, value, times);
	}



}
